<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of class
 *
 * @author ww
 */
class HelperVK {
public static function getVKMainData($VK, $token) {
        $result = $VK->api('friends.get', $token);
        $data['num_of_friends'] = count($result['response']);
        $result = $VK->api('users.get', $token, array('fields'=>'photo_big,sex,bdate'));
        $data = array_merge($data, $result['response'][0]);
        $data['sex']--;
        $data['bdate'] = date("o-m-d",strtotime ($data['bdate']));  
        return $data;
}
}
?>
